﻿using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

namespace Emico.Data.Repository
{
    public interface IDbRepository<TEntity> : IRepository<TEntity>
        where TEntity : class
    {
        TEntity Find(params object[] keyValues);
        IEnumerable<TEntity> AddRange(IEnumerable<TEntity> entities);        
        IEnumerable<TEntity> RemoveRange(IEnumerable<TEntity> entities);

        IQueryable<TEntity> AsQueryable();

        Task<TEntity> FindAsync(params object[] keyValues);
        Task<TEntity> FindAsync(CancellationToken cancellationToken, params object[] keyValues);
    }
}
